.class public Lcom/openfeint/internal/OpenFeintInternal;
.super Ljava/lang/Object;
.source "OpenFeintInternal.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;,
        Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;
    }
.end annotation


# static fields
.field private static final DEVELOPMENT_LOGGING_ENABLED:Z = false

.field private static final TAG:Ljava/lang/String; = "OpenFeint"

.field private static sInstance:Lcom/openfeint/internal/OpenFeintInternal;


# instance fields
.field analytics:Lcom/openfeint/internal/Analytics;

.field mAppVersion:I

.field private mApproved:Z

.field private mBanned:Z

.field mClient:Lcom/openfeint/internal/request/Client;

.field private mContext:Landroid/content/Context;

.field private mCreatingDeviceSession:Z

.field private mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

.field private mCurrentlyLoggingIn:Z

.field private mDeclined:Z

.field mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

.field private mDeserializedAlready:Z

.field private mDeviceSessionCreated:Z

.field mInternalProperties:Ljava/util/Properties;

.field private mLoginDelegate:Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;

.field mMainThreadHandler:Landroid/os/Handler;

.field private mPostDeviceSessionRunnable:Ljava/lang/Runnable;

.field private mPostLoginRunnable:Ljava/lang/Runnable;

.field private mPrefs:Lcom/openfeint/internal/SyncedStore;

.field private mQueuedPostDeviceSessionRunnables:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field private mQueuedPostLoginRunnables:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field mServerUrl:Ljava/lang/String;

.field mSettings:Lcom/openfeint/api/OpenFeintSettings;

.field mUDID:Ljava/lang/String;


# direct methods
.method private constructor <init>(Lcom/openfeint/api/OpenFeintSettings;Landroid/content/Context;)V
    .locals 6
    .parameter "settings"
    .parameter "ctx"

    .prologue
    .line 835
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 104
    const/4 v2, -0x1

    iput v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mAppVersion:I

    .line 837
    sput-object p0, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    .line 838
    iput-object p2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mContext:Landroid/content/Context;

    .line 840
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    .line 842
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v2

    invoke-virtual {v2}, Lcom/openfeint/internal/SyncedStore;->read()Lcom/openfeint/internal/SyncedStore$Reader;

    move-result-object v1

    .line 844
    .local v1, r:Lcom/openfeint/internal/SyncedStore$Reader;
    :try_start_0
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, ".of_declined"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Lcom/openfeint/internal/SyncedStore$Reader;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    if-eqz v2, :cond_1

    const/4 v2, 0x1

    :goto_0
    iput-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 846
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 849
    new-instance v2, Landroid/os/Handler;

    invoke-direct {v2}, Landroid/os/Handler;-><init>()V

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mMainThreadHandler:Landroid/os/Handler;

    .line 850
    new-instance v2, Ljava/util/Properties;

    invoke-direct {v2}, Ljava/util/Properties;-><init>()V

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    .line 851
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    const-string v3, "server-url"

    const-string v4, "https://api.openfeint.com"

    invoke-virtual {v2, v3, v4}, Ljava/util/Properties;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 853
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    const-string v3, "of-version"

    const-string v4, "1.9.2"

    invoke-virtual {v2, v3, v4}, Ljava/util/Properties;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 855
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    const-string v3, "@xml/openfeint_internal_settings"

    invoke-virtual {p0, v3}, Lcom/openfeint/internal/OpenFeintInternal;->getResource(Ljava/lang/String;)I

    move-result v3

    invoke-direct {p0, v2, v3}, Lcom/openfeint/internal/OpenFeintInternal;->loadPropertiesFromXMLResource(Ljava/util/Properties;I)V

    .line 857
    const-string v2, "OpenFeint"

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Using OpenFeint version "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    const-string v5, "of-version"

    invoke-virtual {v4, v5}, Ljava/util/Properties;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, " ("

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    const-string v5, "server-url"

    invoke-virtual {v4, v5}, Ljava/util/Properties;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ")"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 859
    new-instance v0, Ljava/util/Properties;

    invoke-direct {v0}, Ljava/util/Properties;-><init>()V

    .line 860
    .local v0, appProperties:Ljava/util/Properties;
    const-string v2, "@xml/openfeint_app_settings"

    invoke-virtual {p0, v2}, Lcom/openfeint/internal/OpenFeintInternal;->getResource(Ljava/lang/String;)I

    move-result v2

    invoke-direct {p0, v0, v2}, Lcom/openfeint/internal/OpenFeintInternal;->loadPropertiesFromXMLResource(Ljava/util/Properties;I)V

    .line 861
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    invoke-virtual {v2, v0}, Lcom/openfeint/api/OpenFeintSettings;->applyOverrides(Ljava/util/Properties;)V

    .line 863
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    invoke-virtual {v2}, Lcom/openfeint/api/OpenFeintSettings;->verify()V

    .line 865
    invoke-static {}, Lcom/openfeint/internal/Encryption;->initialized()Z

    move-result v2

    if-nez v2, :cond_0

    .line 866
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v2, v2, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    invoke-static {v2}, Lcom/openfeint/internal/Encryption;->init(Ljava/lang/String;)Z

    .line 869
    :cond_0
    new-instance v2, Lcom/openfeint/internal/request/Client;

    iget-object v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v3, v3, Lcom/openfeint/api/OpenFeintSettings;->key:Ljava/lang/String;

    iget-object v4, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v4, v4, Lcom/openfeint/api/OpenFeintSettings;->secret:Ljava/lang/String;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v5

    invoke-direct {v2, v3, v4, v5}, Lcom/openfeint/internal/request/Client;-><init>(Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/internal/SyncedStore;)V

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    .line 870
    invoke-static {p2}, Lcom/openfeint/internal/Util;->moveWebCache(Landroid/content/Context;)V

    .line 872
    invoke-static {p2}, Lcom/openfeint/internal/ui/WebViewCache;->initialize(Landroid/content/Context;)Lcom/openfeint/internal/ui/WebViewCache;

    .line 875
    invoke-static {p2}, Lcom/openfeint/internal/db/DB;->createDB(Landroid/content/Context;)V

    .line 876
    invoke-static {}, Lcom/openfeint/internal/ui/WebViewCache;->start()V

    .line 877
    new-instance v2, Lcom/openfeint/internal/Analytics;

    invoke-direct {v2}, Lcom/openfeint/internal/Analytics;-><init>()V

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->analytics:Lcom/openfeint/internal/Analytics;

    .line 878
    return-void

    .line 844
    .end local v0           #appProperties:Ljava/util/Properties;
    :cond_1
    const/4 v2, 0x0

    goto/16 :goto_0

    .line 845
    :catchall_0
    move-exception v2

    .line 846
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 847
    throw v2
.end method

.method private final _makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V
    .locals 2
    .parameter "req"

    .prologue
    .line 660
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->isUserLoggedIn()Z

    move-result v0

    if-nez v0, :cond_1

    invoke-virtual {p1}, Lcom/openfeint/internal/request/BaseRequest;->wantsLogin()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->lastLoggedInUser()Lcom/openfeint/api/resource/User;

    move-result-object v0

    if-eqz v0, :cond_1

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->isFeintServerReachable()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 663
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->login(Z)V

    .line 664
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostLoginRunnables:Ljava/util/List;

    if-nez v0, :cond_0

    .line 665
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostLoginRunnables:Ljava/util/List;

    .line 667
    :cond_0
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostLoginRunnables:Ljava/util/List;

    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal$7;

    invoke-direct {v1, p0, p1}, Lcom/openfeint/internal/OpenFeintInternal$7;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/BaseRequest;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 687
    :goto_0
    return-void

    .line 672
    :cond_1
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    if-nez v0, :cond_3

    invoke-virtual {p1}, Lcom/openfeint/internal/request/BaseRequest;->needsDeviceSession()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 674
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->createDeviceSession()V

    .line 676
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostDeviceSessionRunnables:Ljava/util/List;

    if-nez v0, :cond_2

    .line 677
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostDeviceSessionRunnables:Ljava/util/List;

    .line 679
    :cond_2
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostDeviceSessionRunnables:Ljava/util/List;

    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal$8;

    invoke-direct {v1, p0, p1}, Lcom/openfeint/internal/OpenFeintInternal$8;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/BaseRequest;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 685
    :cond_3
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    invoke-virtual {v0, p1}, Lcom/openfeint/internal/request/Client;->makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    goto :goto_0
.end method

.method private _restoreInstanceState(Landroid/os/Bundle;)V
    .locals 1
    .parameter "inState"

    .prologue
    .line 131
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeserializedAlready:Z

    if-nez v0, :cond_1

    if-eqz p1, :cond_1

    .line 132
    const-string v0, "mCurrentUser"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/openfeint/internal/OpenFeintInternal;->userFromString(Ljava/lang/String;)Lcom/openfeint/api/resource/User;

    move-result-object v0

    check-cast v0, Lcom/openfeint/api/resource/CurrentUser;

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    .line 133
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    invoke-virtual {v0, p1}, Lcom/openfeint/internal/request/Client;->restoreInstanceState(Landroid/os/Bundle;)V

    .line 134
    :cond_0
    const-string v0, "mCurrentlyLoggingIn"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    .line 135
    const-string v0, "mCreatingDeviceSession"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    .line 136
    const-string v0, "mDeviceSessionCreated"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    .line 137
    const-string v0, "mBanned"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mBanned:Z

    .line 138
    const-string v0, "mApproved"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    .line 139
    const-string v0, "mDeclined"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    .line 140
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeserializedAlready:Z

    .line 142
    :cond_1
    return-void
.end method

.method private _saveInstanceState(Landroid/os/Bundle;)V
    .locals 2
    .parameter "outState"

    .prologue
    .line 120
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    if-eqz v0, :cond_0

    const-string v0, "mCurrentUser"

    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    invoke-virtual {v1}, Lcom/openfeint/api/resource/CurrentUser;->generate()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 121
    :cond_0
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    invoke-virtual {v0, p1}, Lcom/openfeint/internal/request/Client;->saveInstanceState(Landroid/os/Bundle;)V

    .line 122
    :cond_1
    const-string v0, "mCurrentlyLoggingIn"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 123
    const-string v0, "mCreatingDeviceSession"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 124
    const-string v0, "mDeviceSessionCreated"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 125
    const-string v0, "mBanned"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mBanned:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 126
    const-string v0, "mApproved"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 127
    const-string v0, "mDeclined"

    iget-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    .line 128
    return-void
.end method

.method static synthetic access$0(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/api/resource/User;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 199
    invoke-direct {p0, p1}, Lcom/openfeint/internal/OpenFeintInternal;->userLoggedIn(Lcom/openfeint/api/resource/User;)V

    return-void
.end method

.method static synthetic access$1(Lcom/openfeint/internal/OpenFeintInternal;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 82
    iput-boolean p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    return-void
.end method

.method static synthetic access$10(Lcom/openfeint/internal/OpenFeintInternal;)Ljava/lang/Runnable;
    .locals 1
    .parameter

    .prologue
    .line 101
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic access$11(Lcom/openfeint/internal/OpenFeintInternal;)Ljava/util/List;
    .locals 1
    .parameter

    .prologue
    .line 102
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostLoginRunnables:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$12(Lcom/openfeint/internal/OpenFeintInternal;Ljava/util/List;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 102
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostLoginRunnables:Ljava/util/List;

    return-void
.end method

.method static synthetic access$13(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/BaseRequest;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 659
    invoke-direct {p0, p1}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    return-void
.end method

.method static synthetic access$14(Lcom/openfeint/internal/OpenFeintInternal;)Z
    .locals 1
    .parameter

    .prologue
    .line 87
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    return v0
.end method

.method static synthetic access$15(Lcom/openfeint/internal/OpenFeintInternal;)Z
    .locals 1
    .parameter

    .prologue
    .line 81
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    return v0
.end method

.method static synthetic access$16(Lcom/openfeint/internal/OpenFeintInternal;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 93
    iput-boolean p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeserializedAlready:Z

    return-void
.end method

.method static synthetic access$17(Lcom/openfeint/internal/OpenFeintInternal;)Lcom/openfeint/api/resource/User;
    .locals 1
    .parameter

    .prologue
    .line 890
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->lastLoggedInUser()Lcom/openfeint/api/resource/User;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$18(Lcom/openfeint/internal/OpenFeintInternal;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 84
    iput-boolean p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mBanned:Z

    return-void
.end method

.method static synthetic access$19(Lcom/openfeint/internal/OpenFeintInternal;)V
    .locals 0
    .parameter

    .prologue
    .line 251
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->clearPrefs()V

    return-void
.end method

.method static synthetic access$2(Lcom/openfeint/internal/OpenFeintInternal;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 83
    iput-boolean p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    return-void
.end method

.method static synthetic access$20(Lcom/openfeint/internal/OpenFeintInternal;)Z
    .locals 1
    .parameter

    .prologue
    .line 86
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    return v0
.end method

.method static synthetic access$3(Lcom/openfeint/internal/OpenFeintInternal;)Ljava/lang/Runnable;
    .locals 1
    .parameter

    .prologue
    .line 99
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostDeviceSessionRunnable:Ljava/lang/Runnable;

    return-object v0
.end method

.method static synthetic access$4(Lcom/openfeint/internal/OpenFeintInternal;Ljava/lang/Runnable;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 101
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    return-void
.end method

.method static synthetic access$5(Lcom/openfeint/internal/OpenFeintInternal;ILjava/lang/Object;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1003
    invoke-direct {p0, p1, p2}, Lcom/openfeint/internal/OpenFeintInternal;->showOfflineNotification(ILjava/lang/Object;)V

    return-void
.end method

.method static synthetic access$6(Lcom/openfeint/internal/OpenFeintInternal;)Ljava/util/List;
    .locals 1
    .parameter

    .prologue
    .line 100
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostDeviceSessionRunnables:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$7(Lcom/openfeint/internal/OpenFeintInternal;Ljava/lang/Runnable;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 99
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostDeviceSessionRunnable:Ljava/lang/Runnable;

    return-void
.end method

.method static synthetic access$8(Lcom/openfeint/internal/OpenFeintInternal;Ljava/util/List;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 100
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mQueuedPostDeviceSessionRunnables:Ljava/util/List;

    return-void
.end method

.method static synthetic access$9(Lcom/openfeint/internal/OpenFeintInternal;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 81
    iput-boolean p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    return-void
.end method

.method private static cat(Ljava/lang/String;)Ljava/util/List;
    .locals 6
    .parameter "filename"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 319
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 321
    .local v3, rv:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    :try_start_0
    new-instance v1, Ljava/io/FileInputStream;

    invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V

    .line 322
    .local v1, f:Ljava/io/FileInputStream;
    new-instance v0, Ljava/io/BufferedReader;

    new-instance v4, Ljava/io/InputStreamReader;

    invoke-direct {v4, v1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V

    const/16 v5, 0x2000

    invoke-direct {v0, v4, v5}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V

    .line 323
    .local v0, br:Ljava/io/BufferedReader;
    const/4 v2, 0x0

    .line 324
    .local v2, line:Ljava/lang/String;
    :goto_0
    invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v2

    if-nez v2, :cond_0

    .line 327
    invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V

    .line 332
    .end local v0           #br:Ljava/io/BufferedReader;
    .end local v1           #f:Ljava/io/FileInputStream;
    .end local v2           #line:Ljava/lang/String;
    :goto_1
    return-object v3

    .line 325
    .restart local v0       #br:Ljava/io/BufferedReader;
    .restart local v1       #f:Ljava/io/FileInputStream;
    .restart local v2       #line:Ljava/lang/String;
    :cond_0
    invoke-interface {v3, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 328
    .end local v0           #br:Ljava/io/BufferedReader;
    .end local v1           #f:Ljava/io/FileInputStream;
    .end local v2           #line:Ljava/lang/String;
    :catch_0
    move-exception v4

    goto :goto_1
.end method

.method private checkBan()Z
    .locals 2

    .prologue
    .line 954
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mBanned:Z

    if-eqz v0, :cond_0

    .line 955
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v0

    const v1, 0x7f040025

    invoke-virtual {v0, v1}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->displayErrorDialog(Ljava/lang/CharSequence;)V

    .line 956
    const/4 v0, 0x1

    .line 958
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private clearPrefs()V
    .locals 2

    .prologue
    .line 252
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v1

    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore;->edit()Lcom/openfeint/internal/SyncedStore$Editor;

    move-result-object v0

    .line 254
    .local v0, e:Lcom/openfeint/internal/SyncedStore$Editor;
    :try_start_0
    const-string v1, "last_logged_in_server"

    invoke-virtual {v0, v1}, Lcom/openfeint/internal/SyncedStore$Editor;->remove(Ljava/lang/String;)V

    .line 255
    const-string v1, "last_logged_in_user_name"

    invoke-virtual {v0, v1}, Lcom/openfeint/internal/SyncedStore$Editor;->remove(Ljava/lang/String;)V

    .line 257
    invoke-direct {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->clearUser(Lcom/openfeint/internal/SyncedStore$Editor;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 259
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 261
    return-void

    .line 258
    :catchall_0
    move-exception v1

    .line 259
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 260
    throw v1
.end method

.method private clearUser(Lcom/openfeint/internal/SyncedStore$Editor;)V
    .locals 1
    .parameter "e"

    .prologue
    .line 168
    const-string v0, "last_logged_in_user"

    invoke-virtual {p1, v0}, Lcom/openfeint/internal/SyncedStore$Editor;->remove(Ljava/lang/String;)V

    .line 169
    return-void
.end method

.method private findUDID()Ljava/lang/String;
    .locals 8

    .prologue
    .line 616
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const-string v5, "android_id"

    invoke-static {v4, v5}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 619
    .local v0, androidID:Ljava/lang/String;
    if-eqz v0, :cond_0

    const-string v4, "9774d56d682e549c"

    invoke-virtual {v0, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_0

    .line 620
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "android-id-"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 643
    :goto_0
    return-object v4

    .line 623
    :cond_0
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v4

    invoke-virtual {v4}, Lcom/openfeint/internal/SyncedStore;->read()Lcom/openfeint/internal/SyncedStore$Reader;

    move-result-object v2

    .line 625
    .local v2, r:Lcom/openfeint/internal/SyncedStore$Reader;
    :try_start_0
    const-string v4, "udid"

    const/4 v5, 0x0

    invoke-virtual {v2, v4, v5}, Lcom/openfeint/internal/SyncedStore$Reader;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v0

    .line 627
    invoke-virtual {v2}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 630
    if-nez v0, :cond_1

    .line 631
    const/16 v4, 0x10

    new-array v3, v4, [B

    .line 632
    .local v3, randomBytes:[B
    new-instance v4, Ljava/util/Random;

    invoke-direct {v4}, Ljava/util/Random;-><init>()V

    invoke-virtual {v4, v3}, Ljava/util/Random;->nextBytes([B)V

    .line 633
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "android-emu-"

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    new-instance v5, Ljava/lang/String;

    invoke-static {v3}, Lorg/apache/commons/codec/binary/Hex;->encodeHex([B)[C

    move-result-object v6

    invoke-direct {v5, v6}, Ljava/lang/String;-><init>([C)V

    const-string v6, "\r\n"

    const-string v7, ""

    invoke-virtual {v5, v6, v7}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 635
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v4

    invoke-virtual {v4}, Lcom/openfeint/internal/SyncedStore;->edit()Lcom/openfeint/internal/SyncedStore$Editor;

    move-result-object v1

    .line 637
    .local v1, e:Lcom/openfeint/internal/SyncedStore$Editor;
    :try_start_1
    const-string v4, "udid"

    invoke-virtual {v1, v4, v0}, Lcom/openfeint/internal/SyncedStore$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    .line 639
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .end local v1           #e:Lcom/openfeint/internal/SyncedStore$Editor;
    .end local v3           #randomBytes:[B
    :cond_1
    move-object v4, v0

    .line 643
    goto :goto_0

    .line 626
    :catchall_0
    move-exception v4

    .line 627
    invoke-virtual {v2}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 628
    throw v4

    .line 638
    .restart local v1       #e:Lcom/openfeint/internal/SyncedStore$Editor;
    .restart local v3       #randomBytes:[B
    :catchall_1
    move-exception v4

    .line 639
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 640
    throw v4
.end method

.method public static genericRequest(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Lcom/openfeint/internal/request/IRawRequestDelegate;)V
    .locals 6
    .parameter "path"
    .parameter "method"
    .parameter
    .parameter
    .parameter "delegate"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;",
            "Lcom/openfeint/internal/request/IRawRequestDelegate;",
            ")V"
        }
    .end annotation

    .prologue
    .line 513
    .local p2, args:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    .local p3, httpParams:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    new-instance v0, Lcom/openfeint/internal/request/GenericRequest;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/openfeint/internal/request/GenericRequest;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Lcom/openfeint/internal/request/IRawRequestDelegate;)V

    invoke-static {v0}, Lcom/openfeint/internal/OpenFeintInternal;->makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    .line 514
    return-void
.end method

.method public static getInstance()Lcom/openfeint/internal/OpenFeintInternal;
    .locals 1

    .prologue
    .line 153
    sget-object v0, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    return-object v0
.end method

.method public static getModelString()Ljava/lang/String;
    .locals 2

    .prologue
    .line 283
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "p("

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Landroid/os/Build;->PRODUCT:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")/m("

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getOSVersionString()Ljava/lang/String;
    .locals 2

    .prologue
    .line 287
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "v"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    sget-object v1, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " ("

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Landroid/os/Build$VERSION;->INCREMENTAL:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getProcessorInfo()Ljava/lang/String;
    .locals 7

    .prologue
    .line 296
    const-string v0, "unknown"

    .line 298
    .local v0, family:Ljava/lang/String;
    :try_start_0
    const-string v2, "/proc/cpuinfo"

    invoke-static {v2}, Lcom/openfeint/internal/OpenFeintInternal;->cat(Ljava/lang/String;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-nez v3, :cond_1

    .line 305
    :goto_0
    const-string v2, "family(%s) min(%s) max(%s)"

    const/4 v3, 0x3

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    .line 306
    aput-object v0, v3, v4

    const/4 v4, 0x1

    .line 307
    const-string v5, "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"

    invoke-static {v5}, Lcom/openfeint/internal/OpenFeintInternal;->cat(Ljava/lang/String;)Ljava/util/List;

    move-result-object v5

    const/4 v6, 0x0

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x2

    .line 308
    const-string v5, "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"

    invoke-static {v5}, Lcom/openfeint/internal/OpenFeintInternal;->cat(Ljava/lang/String;)Ljava/util/List;

    move-result-object v5

    const/4 v6, 0x0

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    aput-object v5, v3, v4

    .line 305
    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    .line 314
    :goto_1
    return-object v2

    .line 298
    :cond_1
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 299
    .local v1, l:Ljava/lang/String;
    const-string v3, "Processor\t"

    invoke-virtual {v1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 300
    const-string v2, ":"

    invoke-virtual {v1, v2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x1

    aget-object v2, v2, v3

    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 301
    goto :goto_0

    .line 310
    .end local v1           #l:Ljava/lang/String;
    :catch_0
    move-exception v2

    .line 314
    const-string v2, "family(unknown) min(unknown) max(unknown)"

    goto :goto_1
.end method

.method public static getRString(I)Ljava/lang/String;
    .locals 3
    .parameter "id"

    .prologue
    .line 740
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v1

    .line 741
    .local v1, ofi:Lcom/openfeint/internal/OpenFeintInternal;
    invoke-virtual {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 742
    .local v0, ctx:Landroid/content/Context;
    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v2, p0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method public static getScreenInfo()Ljava/lang/String;
    .locals 5

    .prologue
    .line 291
    invoke-static {}, Lcom/openfeint/internal/Util;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 292
    .local v0, metrics:Landroid/util/DisplayMetrics;
    const-string v1, "%dx%d (%f dpi)"

    const/4 v2, 0x3

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    iget v4, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    iget v4, v0, Landroid/util/DisplayMetrics;->heightPixels:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x2

    iget v4, v0, Landroid/util/DisplayMetrics;->density:F

    invoke-static {v4}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v4

    aput-object v4, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    return-object v1
.end method

.method public static initialize(Landroid/content/Context;Lcom/openfeint/api/OpenFeintSettings;Lcom/openfeint/api/OpenFeintDelegate;)V
    .locals 2
    .parameter "ctx"
    .parameter "settings"
    .parameter "delegate"

    .prologue
    .line 770
    invoke-static {p0, p1, p2}, Lcom/openfeint/internal/OpenFeintInternal;->initializeWithoutLoggingIn(Landroid/content/Context;Lcom/openfeint/api/OpenFeintSettings;Lcom/openfeint/api/OpenFeintDelegate;)V

    .line 771
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v0

    .line 772
    .local v0, ofi:Lcom/openfeint/internal/OpenFeintInternal;
    if-eqz v0, :cond_0

    .line 773
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/openfeint/internal/OpenFeintInternal;->login(Z)V

    .line 775
    :cond_0
    return-void
.end method

.method public static initializeWithoutLoggingIn(Landroid/content/Context;Lcom/openfeint/api/OpenFeintSettings;Lcom/openfeint/api/OpenFeintDelegate;)V
    .locals 2
    .parameter "ctx"
    .parameter "settings"
    .parameter "delegate"

    .prologue
    .line 748
    invoke-static {p0}, Lcom/openfeint/internal/OpenFeintInternal;->validateManifest(Landroid/content/Context;)Z

    .line 750
    sget-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    if-nez v1, :cond_0

    .line 751
    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal;

    invoke-direct {v1, p1, p0}, Lcom/openfeint/internal/OpenFeintInternal;-><init>(Lcom/openfeint/api/OpenFeintSettings;Landroid/content/Context;)V

    sput-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    .line 754
    :cond_0
    sget-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    iput-object p2, v1, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    .line 756
    sget-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    iget-boolean v1, v1, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    if-nez v1, :cond_2

    .line 757
    sget-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    invoke-virtual {v1}, Lcom/openfeint/internal/OpenFeintInternal;->getUserID()Ljava/lang/String;

    move-result-object v0

    .line 758
    .local v0, userID:Ljava/lang/String;
    if-nez v0, :cond_1

    .line 759
    invoke-static {}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserTemporary()V

    .line 763
    :goto_0
    sget-object v1, Lcom/openfeint/internal/OpenFeintInternal;->sInstance:Lcom/openfeint/internal/OpenFeintInternal;

    invoke-virtual {v1}, Lcom/openfeint/internal/OpenFeintInternal;->createDeviceSession()V

    .line 767
    .end local v0           #userID:Ljava/lang/String;
    :goto_1
    return-void

    .line 761
    .restart local v0       #userID:Ljava/lang/String;
    :cond_1
    invoke-static {v0}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserID(Ljava/lang/String;)V

    goto :goto_0

    .line 765
    .end local v0           #userID:Ljava/lang/String;
    :cond_2
    invoke-static {}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserDeclined()V

    goto :goto_1
.end method

.method private final lastLoggedInUser()Lcom/openfeint/api/resource/User;
    .locals 6

    .prologue
    .line 891
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->loadUser()Lcom/openfeint/api/resource/User;

    move-result-object v3

    .line 893
    .local v3, savedUser:Lcom/openfeint/api/resource/User;
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v4

    invoke-virtual {v4}, Lcom/openfeint/internal/SyncedStore;->read()Lcom/openfeint/internal/SyncedStore$Reader;

    move-result-object v1

    .line 896
    .local v1, r:Lcom/openfeint/internal/SyncedStore$Reader;
    :try_start_0
    new-instance v2, Ljava/net/URL;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getServerUrl()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v4}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 897
    .local v2, saved:Ljava/net/URL;
    new-instance v0, Ljava/net/URL;

    const-string v4, "last_logged_in_server"

    const-string v5, ""

    invoke-virtual {v1, v4, v5}, Lcom/openfeint/internal/SyncedStore$Reader;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v0, v4}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    .line 898
    .local v0, loaded:Ljava/net/URL;
    if-eqz v3, :cond_0

    invoke-virtual {v2, v0}, Ljava/net/URL;->equals(Ljava/lang/Object;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v4

    if-eqz v4, :cond_0

    .line 902
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    move-object v4, v3

    .line 905
    .end local v0           #loaded:Ljava/net/URL;
    .end local v2           #saved:Ljava/net/URL;
    :goto_0
    return-object v4

    .line 900
    :catch_0
    move-exception v4

    .line 902
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 905
    :goto_1
    const/4 v4, 0x0

    goto :goto_0

    .line 901
    :catchall_0
    move-exception v4

    .line 902
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 903
    throw v4

    .line 902
    .restart local v0       #loaded:Ljava/net/URL;
    .restart local v2       #saved:Ljava/net/URL;
    :cond_0
    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    goto :goto_1
.end method

.method private loadPropertiesFromXMLResource(Ljava/util/Properties;I)V
    .locals 6
    .parameter "defaults"
    .parameter "resourceID"

    .prologue
    .line 1026
    const/4 v3, 0x0

    .line 1028
    .local v3, xml:Landroid/content/res/XmlResourceParser;
    :try_start_0
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v4

    invoke-virtual {v4}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    invoke-virtual {v4, p2}, Landroid/content/res/Resources;->getXml(I)Landroid/content/res/XmlResourceParser;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    move-result-object v3

    .line 1031
    :goto_0
    if-eqz v3, :cond_0

    .line 1034
    const/4 v2, 0x0

    .line 1035
    .local v2, k:Ljava/lang/String;
    :try_start_1
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getEventType()I

    move-result v1

    .local v1, eventType:I
    :goto_1
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getEventType()I
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result v4

    const/4 v5, 0x1

    if-ne v4, v5, :cond_1

    .line 1046
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->close()V

    .line 1048
    .end local v1           #eventType:I
    .end local v2           #k:Ljava/lang/String;
    :cond_0
    return-void

    .line 1036
    .restart local v1       #eventType:I
    .restart local v2       #k:Ljava/lang/String;
    :cond_1
    const/4 v4, 0x2

    if-ne v1, v4, :cond_3

    .line 1037
    :try_start_2
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getName()Ljava/lang/String;

    move-result-object v2

    .line 1035
    :cond_2
    :goto_2
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->next()I

    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getEventType()I

    move-result v1

    goto :goto_1

    .line 1038
    :cond_3
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getEventType()I

    move-result v4

    const/4 v5, 0x4

    if-ne v4, v5, :cond_2

    .line 1039
    invoke-interface {v3}, Landroid/content/res/XmlResourceParser;->getText()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {p1, v2, v4}, Ljava/util/Properties;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_2

    .line 1042
    .end local v1           #eventType:I
    :catch_0
    move-exception v4

    move-object v0, v4

    .line 1043
    .local v0, e:Ljava/lang/Exception;
    new-instance v4, Ljava/lang/RuntimeException;

    invoke-direct {v4, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V

    throw v4

    .line 1029
    .end local v0           #e:Ljava/lang/Exception;
    .end local v2           #k:Ljava/lang/String;
    :catch_1
    move-exception v4

    goto :goto_0
.end method

.method private loadUser()Lcom/openfeint/api/resource/User;
    .locals 4

    .prologue
    .line 172
    const/4 v1, 0x0

    .line 173
    .local v1, urep:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v2

    invoke-virtual {v2}, Lcom/openfeint/internal/SyncedStore;->read()Lcom/openfeint/internal/SyncedStore$Reader;

    move-result-object v0

    .line 175
    .local v0, r:Lcom/openfeint/internal/SyncedStore$Reader;
    :try_start_0
    const-string v2, "last_logged_in_user"

    const/4 v3, 0x0

    invoke-virtual {v0, v2, v3}, Lcom/openfeint/internal/SyncedStore$Reader;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v1

    .line 177
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 179
    invoke-static {v1}, Lcom/openfeint/internal/OpenFeintInternal;->userFromString(Ljava/lang/String;)Lcom/openfeint/api/resource/User;

    move-result-object v2

    return-object v2

    .line 176
    :catchall_0
    move-exception v2

    .line 177
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Reader;->complete()V

    .line 178
    throw v2
.end method

.method public static log(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter "tag"
    .parameter "message"

    .prologue
    .line 1063
    return-void
.end method

.method public static makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V
    .locals 4
    .parameter "req"

    .prologue
    .line 648
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v1

    .line 649
    .local v1, ofi:Lcom/openfeint/internal/OpenFeintInternal;
    if-nez v1, :cond_0

    .line 650
    new-instance v0, Lcom/openfeint/internal/resource/ServerException;

    invoke-direct {v0}, Lcom/openfeint/internal/resource/ServerException;-><init>()V

    .line 651
    .local v0, e:Lcom/openfeint/internal/resource/ServerException;
    const-string v2, "NoFeint"

    iput-object v2, v0, Lcom/openfeint/internal/resource/ServerException;->exceptionClass:Ljava/lang/String;

    .line 652
    const-string v2, "OpenFeint has not been initialized."

    iput-object v2, v0, Lcom/openfeint/internal/resource/ServerException;->message:Ljava/lang/String;

    .line 653
    const/4 v2, 0x0

    invoke-virtual {v0}, Lcom/openfeint/internal/resource/ServerException;->generate()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->getBytes()[B

    move-result-object v3

    invoke-virtual {p0, v2, v3}, Lcom/openfeint/internal/request/BaseRequest;->onResponse(I[B)V

    .line 657
    .end local v0           #e:Lcom/openfeint/internal/resource/ServerException;
    :goto_0
    return-void

    .line 655
    :cond_0
    invoke-direct {v1, p0}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    goto :goto_0
.end method

.method public static restoreInstanceState(Landroid/os/Bundle;)V
    .locals 1
    .parameter "inState"

    .prologue
    .line 149
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v0

    invoke-direct {v0, p0}, Lcom/openfeint/internal/OpenFeintInternal;->_restoreInstanceState(Landroid/os/Bundle;)V

    .line 150
    return-void
.end method

.method public static saveInstanceState(Landroid/os/Bundle;)V
    .locals 1
    .parameter "outState"

    .prologue
    .line 145
    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getInstance()Lcom/openfeint/internal/OpenFeintInternal;

    move-result-object v0

    invoke-direct {v0, p0}, Lcom/openfeint/internal/OpenFeintInternal;->_saveInstanceState(Landroid/os/Bundle;)V

    .line 146
    return-void
.end method

.method private saveUser(Lcom/openfeint/internal/SyncedStore$Editor;Lcom/openfeint/api/resource/User;)V
    .locals 2
    .parameter "e"
    .parameter "u"

    .prologue
    .line 164
    const-string v0, "last_logged_in_user"

    invoke-virtual {p2}, Lcom/openfeint/api/resource/User;->generate()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Lcom/openfeint/internal/SyncedStore$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 165
    return-void
.end method

.method private saveUserApproval(Lcom/openfeint/internal/SyncedStore$Editor;)V
    .locals 2
    .parameter "e"

    .prologue
    .line 532
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, ".of_declined"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/openfeint/internal/SyncedStore$Editor;->remove(Ljava/lang/String;)V

    .line 533
    return-void
.end method

.method private showOfflineNotification(ILjava/lang/Object;)V
    .locals 5
    .parameter "httpCode"
    .parameter "responseBody"

    .prologue
    .line 1005
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 1006
    .local v0, r:Landroid/content/res/Resources;
    const v2, 0x7f040029

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 1008
    .local v1, serverMessage:Ljava/lang/String;
    if-eqz p1, :cond_1

    .line 1009
    const/16 v2, 0x193

    if-ne v2, p1, :cond_0

    .line 1010
    const/4 v2, 0x1

    iput-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mBanned:Z

    .line 1013
    :cond_0
    instance-of v2, p2, Lcom/openfeint/internal/resource/ServerException;

    if-eqz v2, :cond_1

    .line 1014
    check-cast p2, Lcom/openfeint/internal/resource/ServerException;

    .end local p2
    iget-object v1, p2, Lcom/openfeint/internal/resource/ServerException;->message:Ljava/lang/String;

    .line 1018
    :cond_1
    const v2, 0x7f040028

    invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 1020
    sget-object v3, Lcom/openfeint/api/Notification$Category;->Foreground:Lcom/openfeint/api/Notification$Category;

    sget-object v4, Lcom/openfeint/api/Notification$Type;->NetworkOffline:Lcom/openfeint/api/Notification$Type;

    .line 1018
    invoke-static {v2, v1, v3, v4}, Lcom/openfeint/internal/notifications/TwoLineNotification;->show(Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/api/Notification$Category;Lcom/openfeint/api/Notification$Type;)V

    .line 1022
    const-string v2, "Reachability"

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "Unable to launch IntroFlow because: "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/openfeint/internal/OpenFeintInternal;->log(Ljava/lang/String;Ljava/lang/String;)V

    .line 1023
    return-void
.end method

.method private static userFromString(Ljava/lang/String;)Lcom/openfeint/api/resource/User;
    .locals 7
    .parameter "urep"

    .prologue
    const/4 v6, 0x0

    .line 183
    if-nez p0, :cond_0

    move-object v4, v6

    .line 196
    :goto_0
    return-object v4

    .line 186
    :cond_0
    :try_start_0
    new-instance v2, Lorg/codehaus/jackson/JsonFactory;

    invoke-direct {v2}, Lorg/codehaus/jackson/JsonFactory;-><init>()V

    .line 187
    .local v2, jsonFactory:Lorg/codehaus/jackson/JsonFactory;
    new-instance v4, Ljava/io/ByteArrayInputStream;

    invoke-virtual {p0}, Ljava/lang/String;->getBytes()[B

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/io/ByteArrayInputStream;-><init>([B)V

    invoke-virtual {v2, v4}, Lorg/codehaus/jackson/JsonFactory;->createJsonParser(Ljava/io/InputStream;)Lorg/codehaus/jackson/JsonParser;

    move-result-object v0

    .line 188
    .local v0, jp:Lorg/codehaus/jackson/JsonParser;
    new-instance v1, Lcom/openfeint/internal/JsonResourceParser;

    invoke-direct {v1, v0}, Lcom/openfeint/internal/JsonResourceParser;-><init>(Lorg/codehaus/jackson/JsonParser;)V

    .line 189
    .local v1, jrp:Lcom/openfeint/internal/JsonResourceParser;
    invoke-virtual {v1}, Lcom/openfeint/internal/JsonResourceParser;->parse()Ljava/lang/Object;

    move-result-object v3

    .line 191
    .local v3, responseBody:Ljava/lang/Object;
    if-eqz v3, :cond_1

    instance-of v4, v3, Lcom/openfeint/api/resource/User;

    if-eqz v4, :cond_1

    .line 192
    check-cast v3, Lcom/openfeint/api/resource/User;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .end local v3           #responseBody:Ljava/lang/Object;
    move-object v4, v3

    goto :goto_0

    .line 194
    .end local v0           #jp:Lorg/codehaus/jackson/JsonParser;
    .end local v1           #jrp:Lcom/openfeint/internal/JsonResourceParser;
    .end local v2           #jsonFactory:Lorg/codehaus/jackson/JsonFactory;
    :catch_0
    move-exception v4

    :cond_1
    move-object v4, v6

    .line 196
    goto :goto_0
.end method

.method private userLoggedIn(Lcom/openfeint/api/resource/User;)V
    .locals 4
    .parameter "loggedInUser"

    .prologue
    .line 200
    new-instance v2, Lcom/openfeint/api/resource/CurrentUser;

    invoke-direct {v2}, Lcom/openfeint/api/resource/CurrentUser;-><init>()V

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    .line 201
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    invoke-virtual {v2, p1}, Lcom/openfeint/api/resource/CurrentUser;->shallowCopyAncestorType(Lcom/openfeint/internal/resource/Resource;)V

    .line 203
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->lastLoggedInUser()Lcom/openfeint/api/resource/User;

    move-result-object v1

    .line 204
    .local v1, lliu:Lcom/openfeint/api/resource/User;
    if-eqz v1, :cond_0

    invoke-virtual {v1}, Lcom/openfeint/api/resource/User;->resourceID()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p1}, Lcom/openfeint/api/resource/User;->resourceID()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 207
    :cond_0
    invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager;

    move-result-object v2

    invoke-virtual {v2}, Landroid/webkit/CookieManager;->removeAllCookie()V

    .line 210
    :cond_1
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v2

    invoke-virtual {v2}, Lcom/openfeint/internal/SyncedStore;->edit()Lcom/openfeint/internal/SyncedStore$Editor;

    move-result-object v0

    .line 212
    .local v0, e:Lcom/openfeint/internal/SyncedStore$Editor;
    :try_start_0
    const-string v2, "last_logged_in_server"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getServerUrl()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Lcom/openfeint/internal/SyncedStore$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 213
    invoke-direct {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->saveUserApproval(Lcom/openfeint/internal/SyncedStore$Editor;)V

    .line 215
    invoke-direct {p0, v0, p1}, Lcom/openfeint/internal/OpenFeintInternal;->saveUser(Lcom/openfeint/internal/SyncedStore$Editor;Lcom/openfeint/api/resource/User;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 217
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 220
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    if-eqz v2, :cond_2

    .line 221
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    iget-object v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    invoke-virtual {v2, v3}, Lcom/openfeint/api/OpenFeintDelegate;->userLoggedIn(Lcom/openfeint/api/resource/CurrentUser;)V

    .line 223
    :cond_2
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mLoginDelegate:Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;

    if-eqz v2, :cond_3

    .line 224
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mLoginDelegate:Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;

    iget-object v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    invoke-interface {v2, v3}, Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;->login(Lcom/openfeint/api/resource/User;)V

    .line 226
    :cond_3
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    if-eqz v2, :cond_4

    .line 227
    iget-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mMainThreadHandler:Landroid/os/Handler;

    iget-object v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    invoke-virtual {v2, v3}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 228
    const/4 v2, 0x0

    iput-object v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    .line 230
    :cond_4
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getAnalytics()Lcom/openfeint/internal/Analytics;

    move-result-object v2

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Lcom/openfeint/internal/Analytics;->markSessionOpen(Z)V

    .line 232
    invoke-virtual {p1}, Lcom/openfeint/api/resource/User;->resourceID()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserID(Ljava/lang/String;)V

    .line 233
    return-void

    .line 216
    :catchall_0
    move-exception v2

    .line 217
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 218
    throw v2
.end method

.method private userLoggedOut()V
    .locals 2

    .prologue
    .line 236
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    .line 237
    .local v0, previousLocalUser:Lcom/openfeint/api/resource/User;
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    .line 239
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    .line 241
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->clearPrefs()V

    .line 243
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    if-eqz v1, :cond_0

    .line 244
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    invoke-virtual {v1, v0}, Lcom/openfeint/api/OpenFeintDelegate;->userLoggedOut(Lcom/openfeint/api/resource/User;)V

    .line 246
    :cond_0
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getAnalytics()Lcom/openfeint/internal/Analytics;

    move-result-object v1

    invoke-virtual {v1}, Lcom/openfeint/internal/Analytics;->markSessionClose()V

    .line 248
    invoke-static {}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserDeclined()V

    .line 249
    return-void
.end method

.method private static validateManifest(Landroid/content/Context;)Z
    .locals 11
    .parameter "appContext"

    .prologue
    .line 783
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    .line 785
    .local v0, packageManager:Landroid/content/pm/PackageManager;
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v3

    .line 787
    .local v3, packageInfo:Landroid/content/pm/PackageInfo;
    const/4 v0, 0x4

    new-array v2, v0, [Ljava/lang/String;

    .end local v0           #packageManager:Landroid/content/pm/PackageManager;
    const/4 v0, 0x0

    .line 788
    const-string v1, "com.openfeint.api.ui.Dashboard"

    aput-object v1, v2, v0

    const/4 v0, 0x1

    .line 789
    const-string v1, "com.openfeint.internal.ui.IntroFlow"

    aput-object v1, v2, v0

    const/4 v0, 0x2

    .line 790
    const-string v1, "com.openfeint.internal.ui.Settings"

    aput-object v1, v2, v0

    const/4 v0, 0x3

    .line 791
    const-string v1, "com.openfeint.internal.ui.NativeBrowser"

    aput-object v1, v2, v0

    .line 794
    .local v2, neededActivityInfo:[Ljava/lang/String;
    array-length v5, v2

    const/4 v0, 0x0

    move v6, v0

    :goto_0
    if-lt v6, v5, :cond_0

    .line 815
    const/4 v0, 0x1

    new-array v1, v0, [Ljava/lang/String;

    const/4 v0, 0x0

    .line 816
    const-string v2, "android.permission.INTERNET"

    .end local v2           #neededActivityInfo:[Ljava/lang/String;
    aput-object v2, v1, v0

    .line 819
    .local v1, neededPermissionInfo:[Ljava/lang/String;
    array-length v2, v1

    const/4 v0, 0x0

    move v3, v0

    .end local v3           #packageInfo:Landroid/content/pm/PackageInfo;
    :goto_1
    if-lt v3, v2, :cond_5

    .line 832
    const/4 p0, 0x1

    .end local v1           #neededPermissionInfo:[Ljava/lang/String;
    .end local p0
    :goto_2
    return p0

    .line 794
    .restart local v2       #neededActivityInfo:[Ljava/lang/String;
    .restart local v3       #packageInfo:Landroid/content/pm/PackageInfo;
    .restart local p0
    :cond_0
    aget-object v1, v2, v6

    .line 795
    .local v1, n:Ljava/lang/String;
    const/4 v4, 0x0

    .line 796
    .local v4, victory:Z
    iget-object v7, v3, Landroid/content/pm/PackageInfo;->activities:[Landroid/content/pm/ActivityInfo;

    array-length v8, v7

    const/4 v0, 0x0

    move v9, v0

    :goto_3
    if-lt v9, v8, :cond_1

    move v0, v4

    .line 808
    .end local v4           #victory:Z
    .local v0, victory:Z
    :goto_4
    if-nez v0, :cond_4

    .line 809
    const-string v0, "OpenFeint"

    .end local v0           #victory:Z
    const-string v2, "Couldn\'t find ActivityInfo for %s.\nPlease consult README.txt for the correct configuration."

    .end local v2           #neededActivityInfo:[Ljava/lang/String;
    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    .end local v3           #packageInfo:Landroid/content/pm/PackageInfo;
    const/4 v4, 0x0

    aput-object v1, v3, v4

    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .end local v1           #n:Ljava/lang/String;
    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 810
    const/4 p0, 0x0

    goto :goto_2

    .line 796
    .restart local v1       #n:Ljava/lang/String;
    .restart local v2       #neededActivityInfo:[Ljava/lang/String;
    .restart local v3       #packageInfo:Landroid/content/pm/PackageInfo;
    .restart local v4       #victory:Z
    :cond_1
    aget-object v0, v7, v9

    .line 797
    .local v0, ai:Landroid/content/pm/ActivityInfo;
    iget-object v10, v0, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    invoke-virtual {v10, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-eqz v10, :cond_3

    .line 798
    iget v0, v0, Landroid/content/pm/ActivityInfo;->configChanges:I

    .end local v0           #ai:Landroid/content/pm/ActivityInfo;
    and-int/lit16 v0, v0, 0x80

    if-nez v0, :cond_2

    .line 800
    const-string v0, "OpenFeint"

    const-string v2, "ActivityInfo for %s has the wrong configChanges.\nPlease consult README.txt for the correct configuration."

    .end local v2           #neededActivityInfo:[Ljava/lang/String;
    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    .end local v3           #packageInfo:Landroid/content/pm/PackageInfo;
    const/4 v4, 0x0

    aput-object v1, v3, v4

    .end local v4           #victory:Z
    invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .end local v1           #n:Ljava/lang/String;
    invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 801
    const/4 p0, 0x0

    goto :goto_2

    .line 804
    .restart local v1       #n:Ljava/lang/String;
    .restart local v2       #neededActivityInfo:[Ljava/lang/String;
    .restart local v3       #packageInfo:Landroid/content/pm/PackageInfo;
    .restart local v4       #victory:Z
    :cond_2
    const/4 v0, 0x1

    .line 805
    .end local v4           #victory:Z
    .local v0, victory:Z
    goto :goto_4

    .line 796
    .local v0, ai:Landroid/content/pm/ActivityInfo;
    .restart local v4       #victory:Z
    :cond_3
    add-int/lit8 v0, v9, 0x1

    move v9, v0

    goto :goto_3

    .line 794
    .end local v4           #victory:Z
    .local v0, victory:Z
    :cond_4
    add-int/lit8 v0, v6, 0x1

    move v6, v0

    goto :goto_0

    .line 819
    .end local v0           #victory:Z
    .end local v2           #neededActivityInfo:[Ljava/lang/String;
    .end local v3           #packageInfo:Landroid/content/pm/PackageInfo;
    .local v1, neededPermissionInfo:[Ljava/lang/String;
    :cond_5
    aget-object v0, v1, v3

    .line 820
    .local v0, n:Ljava/lang/String;
    invoke-static {v0, p0}, Lcom/openfeint/internal/Util;->noPermission(Ljava/lang/String;Landroid/content/Context;)Z
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    .end local v0           #n:Ljava/lang/String;
    if-eqz v0, :cond_6

    .line 823
    const/4 p0, 0x0

    goto :goto_2

    .line 819
    :cond_6
    add-int/lit8 v0, v3, 0x1

    move v3, v0

    goto :goto_1

    .line 827
    .end local v1           #neededPermissionInfo:[Ljava/lang/String;
    :catch_0
    move-exception v0

    .line 828
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v0, "OpenFeint"

    .end local v0           #e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v1, "Couldn\'t find PackageInfo for %s.\nPlease initialize OF with an Activity that lives in your root package."

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object p0

    .end local p0
    aput-object p0, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    invoke-static {v0, p0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 829
    const/4 p0, 0x0

    goto :goto_2
.end method


# virtual methods
.method public createDeviceSession()V
    .locals 5

    .prologue
    .line 346
    iget-boolean v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v3, :cond_0

    iget-boolean v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    if-eqz v3, :cond_1

    .line 391
    :cond_0
    :goto_0
    return-void

    .line 348
    :cond_1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 349
    .local v0, argMap:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v3, "platform"

    const-string v4, "android"

    invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 350
    const-string v3, "device"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getDeviceParams()Ljava/util/Map;

    move-result-object v4

    invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 351
    const-string v3, "of-version"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getOFVersion()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 352
    const-string v3, "game_version"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getAppVersion()I

    move-result v4

    invoke-static {v4}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 353
    const-string v3, "protocol_version"

    const-string v4, "1.0"

    invoke-virtual {v0, v3, v4}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 355
    new-instance v1, Lcom/openfeint/internal/request/OrderedArgList;

    invoke-direct {v1, v0}, Lcom/openfeint/internal/request/OrderedArgList;-><init>(Ljava/util/Map;)V

    .line 357
    .local v1, args:Lcom/openfeint/internal/request/OrderedArgList;
    const/4 v3, 0x1

    iput-boolean v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    .line 361
    new-instance v2, Lcom/openfeint/internal/OpenFeintInternal$2;

    invoke-direct {v2, p0, v1}, Lcom/openfeint/internal/OpenFeintInternal$2;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/OrderedArgList;)V

    .line 390
    .local v2, deviceSession:Lcom/openfeint/internal/request/RawRequest;
    invoke-direct {p0, v2}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    goto :goto_0
.end method

.method public createUser(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/internal/request/IRawRequestDelegate;)V
    .locals 3
    .parameter "userName"
    .parameter "email"
    .parameter "password"
    .parameter "passwordConfirmation"
    .parameter "delegate"

    .prologue
    .line 264
    new-instance v0, Lcom/openfeint/internal/request/OrderedArgList;

    invoke-direct {v0}, Lcom/openfeint/internal/request/OrderedArgList;-><init>()V

    .line 265
    .local v0, bootstrapArgs:Lcom/openfeint/internal/request/OrderedArgList;
    const-string v2, "user[name]"

    invoke-virtual {v0, v2, p1}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 266
    const-string v2, "user[http_basic_credential_attributes][email]"

    invoke-virtual {v0, v2, p2}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 267
    const-string v2, "user[http_basic_credential_attributes][password]"

    invoke-virtual {v0, v2, p3}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 268
    const-string v2, "user[http_basic_credential_attributes][password_confirmation]"

    invoke-virtual {v0, v2, p4}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 270
    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal$1;

    invoke-direct {v1, p0, v0}, Lcom/openfeint/internal/OpenFeintInternal$1;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/OrderedArgList;)V

    .line 278
    .local v1, userCreate:Lcom/openfeint/internal/request/RawRequest;
    invoke-virtual {v1, p5}, Lcom/openfeint/internal/request/RawRequest;->setDelegate(Lcom/openfeint/internal/request/IRawRequestDelegate;)V

    .line 279
    invoke-direct {p0, v1}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    .line 280
    return-void
.end method

.method public currentlyLoggingIn()Z
    .locals 1

    .prologue
    .line 550
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    if-nez v0, :cond_0

    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public displayErrorDialog(Ljava/lang/CharSequence;)V
    .locals 3
    .parameter "errorMessage"

    .prologue
    .line 601
    invoke-interface {p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    sget-object v1, Lcom/openfeint/api/Notification$Category;->Foreground:Lcom/openfeint/api/Notification$Category;

    sget-object v2, Lcom/openfeint/api/Notification$Type;->Error:Lcom/openfeint/api/Notification$Type;

    invoke-static {v0, v1, v2}, Lcom/openfeint/internal/notifications/SimpleNotification;->show(Ljava/lang/String;Lcom/openfeint/api/Notification$Category;Lcom/openfeint/api/Notification$Type;)V

    .line 612
    return-void
.end method

.method public getAnalytics()Lcom/openfeint/internal/Analytics;
    .locals 1

    .prologue
    .line 880
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->analytics:Lcom/openfeint/internal/Analytics;

    return-object v0
.end method

.method public getAppID()Ljava/lang/String;
    .locals 1

    .prologue
    .line 583
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v0, v0, Lcom/openfeint/api/OpenFeintSettings;->id:Ljava/lang/String;

    return-object v0
.end method

.method public getAppName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 582
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v0, v0, Lcom/openfeint/api/OpenFeintSettings;->name:Ljava/lang/String;

    return-object v0
.end method

.method public getAppVersion()I
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 586
    iget v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mAppVersion:I

    const/4 v4, -0x1

    if-ne v3, v4, :cond_0

    .line 587
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 589
    .local v0, c:Landroid/content/Context;
    :try_start_0
    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    invoke-virtual {v3, v4, v5}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v2

    .line 590
    .local v2, p:Landroid/content/pm/PackageInfo;
    iget v3, v2, Landroid/content/pm/PackageInfo;->versionCode:I

    iput v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mAppVersion:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 595
    .end local v0           #c:Landroid/content/Context;
    .end local v2           #p:Landroid/content/pm/PackageInfo;
    :cond_0
    :goto_0
    iget v3, p0, Lcom/openfeint/internal/OpenFeintInternal;->mAppVersion:I

    return v3

    .line 591
    .restart local v0       #c:Landroid/content/Context;
    :catch_0
    move-exception v3

    move-object v1, v3

    .line 592
    .local v1, e:Ljava/lang/Exception;
    iput v6, p0, Lcom/openfeint/internal/OpenFeintInternal;->mAppVersion:I

    goto :goto_0
.end method

.method public getClient()Lorg/apache/http/impl/client/AbstractHttpClient;
    .locals 1

    .prologue
    .line 155
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mClient:Lcom/openfeint/internal/request/Client;

    return-object v0
.end method

.method public getContext()Landroid/content/Context;
    .locals 1

    .prologue
    .line 598
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method public getCurrentUser()Lcom/openfeint/api/resource/CurrentUser;
    .locals 1

    .prologue
    .line 553
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentUser:Lcom/openfeint/api/resource/CurrentUser;

    return-object v0
.end method

.method public getDelegate()Lcom/openfeint/api/OpenFeintDelegate;
    .locals 1

    .prologue
    .line 154
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    return-object v0
.end method

.method public getDeviceParams()Ljava/util/Map;
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 336
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 337
    .local v0, device:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v1, "identifier"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getUDID()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 338
    const-string v1, "hardware"

    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getModelString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 339
    const-string v1, "os"

    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getOSVersionString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 340
    const-string v1, "screen_resolution"

    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getScreenInfo()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 341
    const-string v1, "processor"

    invoke-static {}, Lcom/openfeint/internal/OpenFeintInternal;->getProcessorInfo()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 342
    return-object v0
.end method

.method public getInternalProperties()Ljava/util/Properties;
    .locals 1

    .prologue
    .line 564
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mInternalProperties:Ljava/util/Properties;

    return-object v0
.end method

.method public getOFVersion()Ljava/lang/String;
    .locals 2

    .prologue
    .line 580
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getInternalProperties()Ljava/util/Properties;

    move-result-object v0

    const-string v1, "of-version"

    invoke-virtual {v0, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getPrefs()Lcom/openfeint/internal/SyncedStore;
    .locals 2

    .prologue
    .line 157
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPrefs:Lcom/openfeint/internal/SyncedStore;

    if-nez v0, :cond_0

    .line 158
    new-instance v0, Lcom/openfeint/internal/SyncedStore;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/openfeint/internal/SyncedStore;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPrefs:Lcom/openfeint/internal/SyncedStore;

    .line 160
    :cond_0
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPrefs:Lcom/openfeint/internal/SyncedStore;

    return-object v0
.end method

.method public getResource(Ljava/lang/String;)I
    .locals 3
    .parameter "resourceName"

    .prologue
    .line 735
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v0

    .line 736
    .local v0, packageName:Ljava/lang/String;
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, p1, v2, v0}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v1

    return v1
.end method

.method public getServerUrl()Ljava/lang/String;
    .locals 4

    .prologue
    .line 567
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mServerUrl:Ljava/lang/String;

    if-nez v1, :cond_0

    .line 569
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getInternalProperties()Ljava/util/Properties;

    move-result-object v1

    const-string v2, "server-url"

    invoke-virtual {v1, v2}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    .line 570
    .local v0, raw:Ljava/lang/String;
    const-string v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 571
    const/4 v1, 0x0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mServerUrl:Ljava/lang/String;

    .line 577
    .end local v0           #raw:Ljava/lang/String;
    :cond_0
    :goto_0
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mServerUrl:Ljava/lang/String;

    return-object v1

    .line 573
    .restart local v0       #raw:Ljava/lang/String;
    :cond_1
    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mServerUrl:Ljava/lang/String;

    goto :goto_0
.end method

.method public getSettings()Ljava/util/Map;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation

    .prologue
    .line 584
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mSettings:Lcom/openfeint/api/OpenFeintSettings;

    iget-object v0, v0, Lcom/openfeint/api/OpenFeintSettings;->settings:Ljava/util/Map;

    return-object v0
.end method

.method public getUDID()Ljava/lang/String;
    .locals 1

    .prologue
    .line 558
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mUDID:Ljava/lang/String;

    if-nez v0, :cond_0

    .line 559
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->findUDID()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mUDID:Ljava/lang/String;

    .line 561
    :cond_0
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mUDID:Ljava/lang/String;

    return-object v0
.end method

.method public getUserID()Ljava/lang/String;
    .locals 2

    .prologue
    .line 883
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getCurrentUser()Lcom/openfeint/api/resource/CurrentUser;

    move-result-object v0

    .line 884
    .local v0, user:Lcom/openfeint/api/resource/User;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/openfeint/api/resource/User;->userID()Ljava/lang/String;

    move-result-object v1

    .line 887
    :goto_0
    return-object v1

    .line 885
    :cond_0
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->lastLoggedInUser()Lcom/openfeint/api/resource/User;

    move-result-object v0

    .line 886
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Lcom/openfeint/api/resource/User;->userID()Ljava/lang/String;

    move-result-object v1

    goto :goto_0

    .line 887
    :cond_1
    const/4 v1, 0x0

    goto :goto_0
.end method

.method public isFeintServerReachable()Z
    .locals 5

    .prologue
    const/4 v4, 0x1

    .line 1051
    const-string v2, "android.permission.ACCESS_NETWORK_STATE"

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/openfeint/internal/Util;->noPermission(Ljava/lang/String;Landroid/content/Context;)Z

    move-result v2

    if-eqz v2, :cond_0

    move v2, v4

    .line 1056
    :goto_0
    return v2

    .line 1054
    :cond_0
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "connectivity"

    invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/ConnectivityManager;

    .line 1055
    .local v1, conMan:Landroid/net/ConnectivityManager;
    invoke-virtual {v1}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;

    move-result-object v0

    .line 1056
    .local v0, activeNetwork:Landroid/net/NetworkInfo;
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Landroid/net/NetworkInfo;->isConnected()Z

    move-result v2

    if-eqz v2, :cond_1

    move v2, v4

    goto :goto_0

    :cond_1
    const/4 v2, 0x0

    goto :goto_0
.end method

.method public isUserLoggedIn()Z
    .locals 1

    .prologue
    .line 555
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getCurrentUser()Lcom/openfeint/api/resource/CurrentUser;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public launchIntroFlow(Z)V
    .locals 4
    .parameter "spotlight"

    .prologue
    .line 962
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->checkBan()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 1001
    :cond_0
    :goto_0
    return-void

    .line 964
    :cond_1
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->isFeintServerReachable()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 965
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getDelegate()Lcom/openfeint/api/OpenFeintDelegate;

    move-result-object v0

    .line 966
    .local v0, d:Lcom/openfeint/api/OpenFeintDelegate;
    iget-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    if-nez v2, :cond_2

    if-eqz v0, :cond_2

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/openfeint/api/OpenFeintDelegate;->showCustomApprovalFlow(Landroid/content/Context;)Z

    move-result v2

    if-nez v2, :cond_0

    .line 971
    :cond_2
    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal$11;

    invoke-direct {v1, p0, p1}, Lcom/openfeint/internal/OpenFeintInternal$11;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Z)V

    .line 986
    .local v1, r:Ljava/lang/Runnable;
    iget-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v2, :cond_3

    iget-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    if-nez v2, :cond_5

    .line 987
    :cond_3
    iget-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v2, :cond_4

    .line 988
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->createDeviceSession()V

    .line 991
    :cond_4
    iput-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostDeviceSessionRunnable:Ljava/lang/Runnable;

    goto :goto_0

    .line 994
    :cond_5
    invoke-interface {v1}, Ljava/lang/Runnable;->run()V

    goto :goto_0

    .line 999
    .end local v0           #d:Lcom/openfeint/api/OpenFeintDelegate;
    .end local v1           #r:Ljava/lang/Runnable;
    :cond_6
    const/4 v2, 0x0

    const-string v3, ""

    invoke-direct {p0, v2, v3}, Lcom/openfeint/internal/OpenFeintInternal;->showOfflineNotification(ILjava/lang/Object;)V

    goto :goto_0
.end method

.method public login(Z)V
    .locals 2
    .parameter "spotlight"

    .prologue
    .line 912
    new-instance v0, Lcom/openfeint/internal/OpenFeintInternal$10;

    invoke-direct {v0, p0, p1}, Lcom/openfeint/internal/OpenFeintInternal$10;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Z)V

    .line 950
    .local v0, r:Ljava/lang/Runnable;
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mMainThreadHandler:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 951
    return-void
.end method

.method public loginUser(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/internal/request/IRawRequestDelegate;)V
    .locals 10
    .parameter "userName"
    .parameter "password"
    .parameter "userID"
    .parameter "delegate"

    .prologue
    .line 398
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->checkBan()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 468
    :goto_0
    return-void

    .line 400
    :cond_0
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v0, :cond_1

    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeviceSessionCreated:Z

    if-nez v0, :cond_3

    .line 401
    :cond_1
    iget-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCreatingDeviceSession:Z

    if-nez v0, :cond_2

    .line 402
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->createDeviceSession()V

    .line 406
    :cond_2
    const-string v0, "OpenFeint"

    const-string v1, "No device session yet - queueing login."

    invoke-static {v0, v1}, Lcom/openfeint/internal/OpenFeintInternal;->log(Ljava/lang/String;Ljava/lang/String;)V

    .line 408
    new-instance v0, Lcom/openfeint/internal/OpenFeintInternal$3;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/openfeint/internal/OpenFeintInternal$3;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/internal/request/IRawRequestDelegate;)V

    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostDeviceSessionRunnable:Ljava/lang/Runnable;

    goto :goto_0

    .line 416
    :cond_3
    const/4 v6, 0x1

    .line 418
    .local v6, allowToast:Z
    new-instance v7, Lcom/openfeint/internal/request/OrderedArgList;

    invoke-direct {v7}, Lcom/openfeint/internal/request/OrderedArgList;-><init>()V

    .line 419
    .local v7, bootstrapArgs:Lcom/openfeint/internal/request/OrderedArgList;
    if-eqz p1, :cond_4

    if-eqz p2, :cond_4

    .line 420
    const-string v0, "login"

    invoke-virtual {v7, v0, p1}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 421
    const-string v0, "password"

    invoke-virtual {v7, v0, p2}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 422
    const/4 v6, 0x0

    .line 427
    :cond_4
    if-eqz p3, :cond_5

    if-eqz p2, :cond_5

    .line 428
    const-string v0, "user_id"

    invoke-virtual {v7, v0, p3}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 429
    const-string v0, "password"

    invoke-virtual {v7, v0, p2}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 430
    const/4 v6, 0x0

    .line 433
    :cond_5
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mCurrentlyLoggingIn:Z

    .line 435
    move v8, v6

    .line 437
    .local v8, finalToast:Z
    new-instance v9, Lcom/openfeint/internal/OpenFeintInternal$4;

    invoke-direct {v9, p0, v7, v8}, Lcom/openfeint/internal/OpenFeintInternal$4;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/OrderedArgList;Z)V

    .line 466
    .local v9, userLogin:Lcom/openfeint/internal/request/RawRequest;
    invoke-virtual {v9, p4}, Lcom/openfeint/internal/request/RawRequest;->setDelegate(Lcom/openfeint/internal/request/IRawRequestDelegate;)V

    .line 467
    invoke-direct {p0, v9}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    goto :goto_0
.end method

.method public logoutUser(Lcom/openfeint/internal/request/IRawRequestDelegate;)V
    .locals 4
    .parameter "delegate"

    .prologue
    .line 497
    new-instance v0, Lcom/openfeint/internal/request/OrderedArgList;

    invoke-direct {v0}, Lcom/openfeint/internal/request/OrderedArgList;-><init>()V

    .line 498
    .local v0, bootstrapArgs:Lcom/openfeint/internal/request/OrderedArgList;
    const-string v2, "platform"

    const-string v3, "android"

    invoke-virtual {v0, v2, v3}, Lcom/openfeint/internal/request/OrderedArgList;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 500
    new-instance v1, Lcom/openfeint/internal/OpenFeintInternal$6;

    invoke-direct {v1, p0, v0}, Lcom/openfeint/internal/OpenFeintInternal$6;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Lcom/openfeint/internal/request/OrderedArgList;)V

    .line 505
    .local v1, userLogout:Lcom/openfeint/internal/request/RawRequest;
    invoke-virtual {v1, p1}, Lcom/openfeint/internal/request/RawRequest;->setDelegate(Lcom/openfeint/internal/request/IRawRequestDelegate;)V

    .line 506
    invoke-direct {p0, v1}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    .line 509
    invoke-direct {p0}, Lcom/openfeint/internal/OpenFeintInternal;->userLoggedOut()V

    .line 510
    return-void
.end method

.method public final runOnUiThread(Ljava/lang/Runnable;)V
    .locals 1
    .parameter "action"

    .prologue
    .line 394
    iget-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mMainThreadHandler:Landroid/os/Handler;

    invoke-virtual {v0, p1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 395
    return-void
.end method

.method public setDelegate(Lcom/openfeint/api/OpenFeintDelegate;)V
    .locals 0
    .parameter "delegate"

    .prologue
    .line 778
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDelegate:Lcom/openfeint/api/OpenFeintDelegate;

    .line 779
    return-void
.end method

.method public setLoginDelegate(Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;)V
    .locals 0
    .parameter "delegate"

    .prologue
    .line 112
    iput-object p1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mLoginDelegate:Lcom/openfeint/internal/OpenFeintInternal$LoginDelegate;

    .line 113
    return-void
.end method

.method public submitIntent(Landroid/content/Intent;Z)V
    .locals 4
    .parameter "intent"
    .parameter "spotlight"

    .prologue
    .line 476
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    .line 478
    new-instance v0, Lcom/openfeint/internal/OpenFeintInternal$5;

    invoke-direct {v0, p0, p1}, Lcom/openfeint/internal/OpenFeintInternal$5;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Landroid/content/Intent;)V

    .line 485
    .local v0, r:Ljava/lang/Runnable;
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->isUserLoggedIn()Z

    move-result v1

    if-nez v1, :cond_1

    .line 486
    const-string v1, "OpenFeint"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "Not logged in yet - queueing intent "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1}, Landroid/content/Intent;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " for now."

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/openfeint/internal/OpenFeintInternal;->log(Ljava/lang/String;Ljava/lang/String;)V

    .line 487
    iput-object v0, p0, Lcom/openfeint/internal/OpenFeintInternal;->mPostLoginRunnable:Ljava/lang/Runnable;

    .line 488
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->currentlyLoggingIn()Z

    move-result v1

    if-nez v1, :cond_0

    .line 489
    invoke-virtual {p0, p2}, Lcom/openfeint/internal/OpenFeintInternal;->login(Z)V

    .line 494
    :cond_0
    :goto_0
    return-void

    .line 492
    :cond_1
    iget-object v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mMainThreadHandler:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0
.end method

.method public uploadFile(Ljava/lang/String;Lcom/openfeint/internal/request/multipart/PartSource;Ljava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V
    .locals 6
    .parameter "xpApiPath"
    .parameter "partSource"
    .parameter "contentType"
    .parameter "delegate"

    .prologue
    .line 711
    new-instance v0, Lcom/openfeint/internal/OpenFeintInternal$9;

    move-object v1, p0

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/openfeint/internal/OpenFeintInternal$9;-><init>(Lcom/openfeint/internal/OpenFeintInternal;Ljava/lang/String;Lcom/openfeint/internal/request/multipart/PartSource;Ljava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V

    .line 731
    .local v0, xpRequest:Lcom/openfeint/internal/request/JSONRequest;
    invoke-direct {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->_makeRequest(Lcom/openfeint/internal/request/BaseRequest;)V

    .line 732
    return-void
.end method

.method public uploadFile(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V
    .locals 5
    .parameter "xpApiPath"
    .parameter "filePath"
    .parameter "contentType"
    .parameter "delegate"

    .prologue
    .line 695
    move-object v1, p2

    .line 696
    .local v1, fileName:Ljava/lang/String;
    :try_start_0
    const-string v3, "/"

    invoke-virtual {p2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 697
    .local v2, parts:[Ljava/lang/String;
    array-length v3, v2

    if-lez v3, :cond_0

    .line 698
    array-length v3, v2

    const/4 v4, 0x1

    sub-int/2addr v3, v4

    aget-object v1, v2, v3

    .line 700
    :cond_0
    new-instance v3, Lcom/openfeint/internal/request/multipart/FilePartSource;

    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v3, v1, v4}, Lcom/openfeint/internal/request/multipart/FilePartSource;-><init>(Ljava/lang/String;Ljava/io/File;)V

    invoke-virtual {p0, p1, v3, p3, p4}, Lcom/openfeint/internal/OpenFeintInternal;->uploadFile(Ljava/lang/String;Lcom/openfeint/internal/request/multipart/PartSource;Ljava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 704
    .end local v2           #parts:[Ljava/lang/String;
    :goto_0
    return-void

    .line 701
    :catch_0
    move-exception v3

    move-object v0, v3

    .line 702
    .local v0, e:Ljava/io/FileNotFoundException;
    const-string v3, ""

    const/4 v4, 0x0

    invoke-interface {p4, v3, v4}, Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;->fileUploadedTo(Ljava/lang/String;Z)V

    goto :goto_0
.end method

.method public uploadFile(Ljava/lang/String;Ljava/lang/String;[BLjava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V
    .locals 1
    .parameter "xpApiPath"
    .parameter "fileName"
    .parameter "fileData"
    .parameter "contentType"
    .parameter "delegate"

    .prologue
    .line 707
    new-instance v0, Lcom/openfeint/internal/request/multipart/ByteArrayPartSource;

    invoke-direct {v0, p2, p3}, Lcom/openfeint/internal/request/multipart/ByteArrayPartSource;-><init>(Ljava/lang/String;[B)V

    invoke-virtual {p0, p1, v0, p4, p5}, Lcom/openfeint/internal/OpenFeintInternal;->uploadFile(Ljava/lang/String;Lcom/openfeint/internal/request/multipart/PartSource;Ljava/lang/String;Lcom/openfeint/internal/OpenFeintInternal$IUploadDelegate;)V

    .line 708
    return-void
.end method

.method public userApprovedFeint()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 517
    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    .line 518
    iput-boolean v2, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    .line 519
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v1

    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore;->edit()Lcom/openfeint/internal/SyncedStore$Editor;

    move-result-object v0

    .line 522
    .local v0, e:Lcom/openfeint/internal/SyncedStore$Editor;
    :try_start_0
    invoke-direct {p0, v0}, Lcom/openfeint/internal/OpenFeintInternal;->saveUserApproval(Lcom/openfeint/internal/SyncedStore$Editor;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 524
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 527
    invoke-virtual {p0, v2}, Lcom/openfeint/internal/OpenFeintInternal;->launchIntroFlow(Z)V

    .line 528
    invoke-static {}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserTemporary()V

    .line 529
    return-void

    .line 523
    :catchall_0
    move-exception v1

    .line 524
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 525
    throw v1
.end method

.method public userDeclinedFeint()V
    .locals 3

    .prologue
    .line 536
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mApproved:Z

    .line 537
    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/openfeint/internal/OpenFeintInternal;->mDeclined:Z

    .line 539
    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getPrefs()Lcom/openfeint/internal/SyncedStore;

    move-result-object v1

    invoke-virtual {v1}, Lcom/openfeint/internal/SyncedStore;->edit()Lcom/openfeint/internal/SyncedStore$Editor;

    move-result-object v0

    .line 541
    .local v0, e:Lcom/openfeint/internal/SyncedStore$Editor;
    :try_start_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-virtual {p0}, Lcom/openfeint/internal/OpenFeintInternal;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, ".of_declined"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    const-string v2, "sadly"

    invoke-virtual {v0, v1, v2}, Lcom/openfeint/internal/SyncedStore$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 543
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 546
    invoke-static {}, Lcom/openfeint/internal/offline/OfflineSupport;->setUserDeclined()V

    .line 547
    return-void

    .line 542
    :catchall_0
    move-exception v1

    .line 543
    invoke-virtual {v0}, Lcom/openfeint/internal/SyncedStore$Editor;->commit()V

    .line 544
    throw v1
.end method
